/**
 * create by young (young2f@outlook.com) on 2023/4/21
 * 数据库服务
 */
'use strict';
const fs = require('fs');
const moment = require('moment');
module.exports = class {
  constructor(app) {
    this.app = app;

  }

  logger(info) {
    const logFile = this.app.config.logsPath + '/iiot.log';
    const time = moment()
      .format('YYYY-MM-DD HH:mm:ss');
    fs.appendFile(logFile, time+"--> "+info + '\r\n', 'utf8', err => {
    });
  }
};